/**
 * 
 */
package com.hu.ta.assignment5.ui.cui;

import java.util.Observable;

import com.hu.ta.assignment5.ui.UIFrame;

/**
 * Command line user interface
 * 
 * @author cage@g.com
 */
public class CUIFrame implements UIFrame {

	private String title;

	/**
	 * Constructor
	 */
	public CUIFrame() {
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hu.ta.assignment.cui.UIFrame#setTitle(java.lang.String)
	 */
	@Override
	public void setTitle(String title) {
		this.title = title;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.hu.ta.assignment.cui.UIFrame#startUI()
	 */
	@Override
	public void startUI() {
		System.out.println(title);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.util.Observer#update(java.util.Observable, java.lang.Object)
	 */
	@Override
	public void update(Observable observable, Object object) {
		if (object instanceof String) {
			System.out.println(object);
		}
		System.out.println("----------------------");
	}
}
